package com.ephra.dao;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class DatabaseConnection {
	private String cond="com.mysql.jdbc.Driver";
	private String conc="jdbc:mysql://localhost:3306/enterprise?characterEncoding=utf-8";
	private String username="root";
	private String password="root";
	
	private Connection conn;

	public DatabaseConnection()throws Exception{
		Class.forName(cond);
		conn=DriverManager.getConnection(conc,username,password);
	}
	
	public Connection getCon() {
		return conn;
	}
	
	public void close() throws SQLException {
		conn.close();
	}
//	public static void main(String args[]) throws Exception {
//		System.out.println(new DatabaseConnection().getCon());
//	}
}
